package app.common.dao;
import java.util.ArrayList;
import java.util.List;

import cn.lily.com.container.data.Record;
import cn.lily.com.exception.YaconException;
import cn.lily.esb.framework.drivers.db.bean.ControlDAO;
public class Leo_can_report_numBean extends ControlDAO implements Cloneable {
	private static final long serialVersionUID = 1L;
	public Leo_can_report_numBean() throws YaconException {
		super();
		setTableName("LEO_CAN_REPORT_NUM");
	}
	String  fleo_can_num_total;
	String  fleo_can_num_add;
	String  fres_time;
	String  fleo_can_date_inf;

	public void setLeo_can_num_total( String leo_can_num_total)throws YaconException{
		setFieldData("leo_can_num_total",leo_can_num_total,NUMBER);
		this.fleo_can_num_total=leo_can_num_total;
	}

	public String getLeo_can_num_total(){
		if ( this.fleo_can_num_total == null){
			return "";
		}
		else {
			return this.fleo_can_num_total;
		}
	}

	public void setLeo_can_num_add( String leo_can_num_add)throws YaconException{
		setFieldData("leo_can_num_add",leo_can_num_add,NUMBER);
		this.fleo_can_num_add=leo_can_num_add;
	}

	public String getLeo_can_num_add(){
		if ( this.fleo_can_num_add == null){
			return "";
		}
		else {
			return this.fleo_can_num_add;
		}
	}

	public void setRes_time( String res_time)throws YaconException{
		setFieldData("res_time",res_time,DATE);
		this.fres_time=res_time;
	}

	public String getRes_time(){
		if ( this.fres_time == null){
			return "";
		}
		else {
			return this.fres_time;
		}
	}

	public void setLeo_can_date_inf( String leo_can_date_inf)throws YaconException{
		setFieldData("leo_can_date_inf",leo_can_date_inf,TEXT);
		this.fleo_can_date_inf=leo_can_date_inf;
	}

	public String getLeo_can_date_inf(){
		if ( this.fleo_can_date_inf == null){
			return "";
		}
		else {
			return this.fleo_can_date_inf;
		}
	}

	public  List<Leo_can_report_numBean> findListBeans(String sSqlWhere)throws YaconException {
		List<Leo_can_report_numBean> listBeans = new ArrayList<Leo_can_report_numBean>();
		findTable = findTableByWhere(sSqlWhere);
		while (findTable.next())
		{
			Leo_can_report_numBean fDaoBean  = new Leo_can_report_numBean();
			fDaoBean.fleo_can_num_total = findTable.getString("leo_can_num_total");
			fDaoBean.fleo_can_num_add = findTable.getString("leo_can_num_add");
			fDaoBean.fres_time = findTable.getString("res_time");
			fDaoBean.fleo_can_date_inf = findTable.getString("leo_can_date_inf");
			fDaoBean.operate_mode = "edit";
			listBeans.add(fDaoBean);
		}
		return listBeans;
	}

	public Leo_can_report_numBean findBean(String sSqlWhere)throws YaconException {
		findTable = findTableByWhere(sSqlWhere);
		if (findTable.next())
		{
			Leo_can_report_numBean fDaoBean  = new Leo_can_report_numBean();
			fDaoBean.fleo_can_num_total = findTable.getString("leo_can_num_total");
			fDaoBean.fleo_can_num_add = findTable.getString("leo_can_num_add");
			fDaoBean.fres_time = findTable.getString("res_time");
			fDaoBean.fleo_can_date_inf = findTable.getString("leo_can_date_inf");
			fDaoBean.operate_mode = "edit";
			return fDaoBean;
		}else
			return null;
	}

	public void setViewRecord(Record viewRecord) throws YaconException{
		if (viewRecord.getString("leo_can_num_total") != null)
			setLeo_can_num_total(viewRecord.getString("leo_can_num_total"));
		if (viewRecord.getString("leo_can_num_add") != null)
			setLeo_can_num_add(viewRecord.getString("leo_can_num_add"));
		if (viewRecord.getString("res_time") != null)
			setRes_time(viewRecord.getString("res_time"));
		if (viewRecord.getString("leo_can_date_inf") != null)
			setLeo_can_date_inf(viewRecord.getString("leo_can_date_inf"));
	}

}
